 # -*- coding: UTF-8 -*-
from django.conf.urls import patterns, include, url
from django.contrib import admin
from django.conf import settings
from django.conf.urls.static import static

# Uncomment the next two lines to enable the admin:
admin.autodiscover()

urlpatterns=patterns(
    'avanzaweb.views',
    url(r'^$',  'index', name='index'),
    url(r'^somos$',  'contenido', {'cn': 'inicio'}, name='somos'),
    url(r'^memoria$',  'contenido', {'cn': 'memoria'}, name='memoria'),
    url(r'^amedida',  'contenido', {'cn': 'amedida'}, name='amedida'),
    url(r'^complementos',  'contenido', {'cn': 'complementos'}, name='complementos'),
    (r'^novedades$', 'novedades'),
    (r'^contacto$',  'frmContacto'),
    (r'^viviendas',  'promociones'),
    url(r'^vivienda/(?P<pr>\d+)$', 'promocion', name='promo'),
    url(r'^vivienda/(?P<pr>\d+)/(?P<pdf>\d+)$',  'promocion', name='pdf'),
    #(r'^promociones$',  'promociones'),
    #url(r'^promo/(?P<pr>\d+)$', 'promocion', name='promo'),
    #url(r'^promo/(?P<pr>\d+)/(?P<pdf>\d+)$',  'promocion', name='pdf'),
    (r'^clientes$',  'estadistica'),
    #url(r'^cuestionario$',  'cuestionario', name='cuestionario'),
    url(r'^enlaces$',  'contenido', {'cn': 'enlaces'}, name='enlaces'),
    #url(r'^metodo$',  'contenido', {'cn': 'metodo'}, name='metodo'),
    #url(r'^origen$', 'contenido', {'cn': 'metodo', 'h': 'Origen'}, name='origen'),
    #url(r'^filosofia$', 'contenido', {'cn': 'metodo', 'h': 'Filosofía'}, name='filosofia'),
    #(r'^cuestionario/(?P<pr>\d+)$',  'cuestionario'),
)

urlpatterns += patterns('',
     (r'^accounts/login/$', 'django.contrib.auth.views.login',  {'template_name': 'mdm/login.html'}),
     (r'^grappelli/', include('grappelli.urls')), # grappelli URLS
     (r'^admin/', include(admin.site.urls)),
     (r'^mdm/',  include('mdm.urls')),
) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
